﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Unis.Framework.Core.Infrastructure;
using KingRoad.EPM.SafetyManagementBLL.UIRules;
using KingRoad.EPM.SafetyManagementEntity.Model;

namespace KingRoad.EPM.Web.Areas.SafetyConstruction.ViewModels
{
    public class ScmSafetyassessmentViewModel
    {
        /// <summary>
        /// 安全考核列表实体
        /// </summary>
        public List<ScmSafetyassessmentInfo> TheSafetyassessmentList { get; set; }
        /// <summary>
        /// 安全考核实体
        /// </summary>
        public ScmSafetyassessmentInfo TheSafetyassessmentInfo { get; set; }
        /// <summary>
        /// 字典类型列表实体
        /// </summary>
        public List<ScmSafetyconstructiondicInfo> TheSafetyconstructiondicList { get; set; }
        /// <summary>
        /// 字典类型实体
        /// </summary>
        public ScmSafetyconstructiondicInfo TheSafetyconstructiondicInfo { get; set; }
        /// <summary>
        /// 考核项目列表实体
        /// </summary>
        public List<ScmAssessmentitemsInfo> TheAssessmentitemsList { get; set; }
        /// <summary>
        /// 监理/施工单位列表实体
        /// </summary>
        public List<ProjectUnitInfo> TheUnitList { get; set; }
        /// <summary>
        /// 被考核单位列表实体
        /// </summary>
        public List<ScmAssessmentunitInfo> TheAssessmentunitList { get; set; }
        /// <summary>
        /// 考核项目设置及打分信息列表实体
        /// </summary>
        public List<ScmAssessmentscoreInfo> TheAssessmentscoreList { get; set; }

        /// <summary>
        /// 获取安全考核类型
        /// </summary>
        /// <returns></returns>
        public string GetTypeName(string id)
        {
            ScmSafetyconstructiondicUIRule rule = EngineContext.Current.Resolve<ScmSafetyconstructiondicUIRule>();
            ScmSafetyconstructiondicInfo info = new ScmSafetyconstructiondicInfo();
            info = rule.GetSafetyconstructiondicByID(new Guid(id));
            return info.Scd_Name;
        }

    }
}